The structure of an object of S3 class scm.
as.scm(x, ...)
# S3 method for bn
as.scm(x, ...)
an object of class bn.
additional arguments, currently ignored.
Marco Scutari
An object of class scm is a list containing at least the following
components:
roles: a list with three named elements:
factual: a vector of character strings, the labels of the
factual nodes in the structural causal model.
exogenous: a vector of character strings, the labels of the
exogenous nodes in the structural causal model.
counterfactual: a vector of character strings, the labels of
the counterfactual nodes in the structural causal model. Unlike previous
elements, it can be empty.
nodes: a list. Each element is named after a node and contains
the following elements:
counterfactual: a character string.
For a factual node, it contains the label of the corresponding counterfactual node (if any).
For an exogenous node, it contains the label of the counterfactual node linked to it (if any).
For a counterfactual node, it is set to character(0).
exogenous: a character string.
For a factual or counterfactual node, it contains the label of the corresponding exogenous node (if any).
For an exogenous node, it is set to character(0).
factual: a character string.
For a counterfactual node, it contains the label of the corresponding factual node.
For an exogenous node, it contains the label of the factual node linked to it (if any).
For a factual node, it is set to character(0).
parents: the parents of the node (a vector of character
strings). Note that exogenous nodes are not listed among the parents of
factual and counterfactual nodes.
children: the children of the node (a vector of character
strings). Note that factual and counterfactual nodes are not listed
among the children of exogenous nodes.
arcs: the arcs of the structural causal model (a two-column
matrix, whose columns are labelled from and to), including
the arcs between exogenous and factual/counterfactual nodes.